
package com.jiuqi.ccp.generator.form;

import java.text.ParseException;
import java.text.SimpleDateFormat;

import javax.servlet.http.HttpServletRequest;

import org.apache.struts.action.ActionError;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;

/**
 * Form for ccpEqInitparam.
 *
 * @author <a href="http://boss.bekk.no/boss/middlegen/"/>Middlegen</a>
 *
 * @struts.form name="ccpEqInitparamForm"
 */
public class CcpEqInitparamForm extends ActionForm {

   private final static SimpleDateFormat FORMAT = new SimpleDateFormat("dd.MM.yyyy hh:mm:ss");

   private java.lang.String _eipGuid = null;
   private java.lang.String _eqsGuid = null;
   private java.lang.String _eipCode = null;
   private java.lang.String _eipName = null;
   private java.lang.String _isStable = null;
   private java.lang.String _defaultValue = null;
   private java.lang.String _reserve1 = null;
   private java.lang.String _reserve2 = null;
   private java.lang.String _reserve3 = null;

   /**
    * Standard constructor.
    */
   public CcpEqInitparamForm() {
   }

   /**
    * Returns the eipGuid
    *
    * @return the eipGuid
    */
   public java.lang.String getEipGuid() {
      return _eipGuid;
   }

   /**
    * Sets the eipGuid
    *
    * @param eipGuid the new eipGuid value
    */
   public void setEipGuid(java.lang.String eipGuid) {
      _eipGuid = eipGuid;
   }
   /**
    * Returns the eqsGuid
    *
    * @return the eqsGuid
    */
   public java.lang.String getEqsGuid() {
      return _eqsGuid;
   }

   /**
    * Sets the eqsGuid
    *
    * @param eqsGuid the new eqsGuid value
    */
   public void setEqsGuid(java.lang.String eqsGuid) {
      _eqsGuid = eqsGuid;
   }
   /**
    * Returns the eipCode
    *
    * @return the eipCode
    */
   public java.lang.String getEipCode() {
      return _eipCode;
   }

   /**
    * Sets the eipCode
    *
    * @param eipCode the new eipCode value
    */
   public void setEipCode(java.lang.String eipCode) {
      _eipCode = eipCode;
   }
   /**
    * Returns the eipName
    *
    * @return the eipName
    */
   public java.lang.String getEipName() {
      return _eipName;
   }

   /**
    * Sets the eipName
    *
    * @param eipName the new eipName value
    */
   public void setEipName(java.lang.String eipName) {
      _eipName = eipName;
   }
   /**
    * Returns the isStable
    *
    * @return the isStable
    */
   public java.lang.String getIsStable() {
      return _isStable;
   }

   /**
    * Sets the isStable
    *
    * @param isStable the new isStable value
    */
   public void setIsStable(java.lang.String isStable) {
      _isStable = isStable;
   }
   /**
    * Returns the defaultValue
    *
    * @return the defaultValue
    */
   public java.lang.String getDefaultValue() {
      return _defaultValue;
   }

   /**
    * Sets the defaultValue
    *
    * @param defaultValue the new defaultValue value
    */
   public void setDefaultValue(java.lang.String defaultValue) {
      _defaultValue = defaultValue;
   }
   /**
    * Returns the reserve1
    *
    * @return the reserve1
    */
   public java.lang.String getReserve1() {
      return _reserve1;
   }

   /**
    * Sets the reserve1
    *
    * @param reserve1 the new reserve1 value
    */
   public void setReserve1(java.lang.String reserve1) {
      _reserve1 = reserve1;
   }
   /**
    * Returns the reserve2
    *
    * @return the reserve2
    */
   public java.lang.String getReserve2() {
      return _reserve2;
   }

   /**
    * Sets the reserve2
    *
    * @param reserve2 the new reserve2 value
    */
   public void setReserve2(java.lang.String reserve2) {
      _reserve2 = reserve2;
   }
   /**
    * Returns the reserve3
    *
    * @return the reserve3
    */
   public java.lang.String getReserve3() {
      return _reserve3;
   }

   /**
    * Sets the reserve3
    *
    * @param reserve3 the new reserve3 value
    */
   public void setReserve3(java.lang.String reserve3) {
      _reserve3 = reserve3;
   }


   /**
    * Validate the properties that have been set from this HTTP request,
    * and return an <code>ActionErrors</code> object that encapsulates any
    * validation errors that have been found.  If no errors are found, return
    * <code>null</code> or an <code>ActionErrors</code> object with no
    * recorded error messages.
    *
    * @param mapping The mapping used to select this instance
    * @param request The servlet request we are processing
    */
   public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) {
      ActionErrors errors = new ActionErrors();
      // test for nullity
      if(getEipGuid() == null) {
         errors.add("eipGuid", new ActionError("error.eipGuid.required"));
      }
      // TODO test format/data
      return errors;
   }
}
